package com.kongchengji.spider.util;

import org.apache.commons.lang3.StringUtils;

import java.util.Collections;
import java.util.Iterator;
import java.util.List;

public class RemoveNullUtil {

    public static List<String> removeNull(List<String> oldList) {
        //去除空元素和null元素
        Iterator<String> it = oldList.iterator();
        while (it.hasNext()){
            if(StringUtils.isBlank(it.next())){
                it.remove();
            }
        }
        return oldList;
    }
}
